﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditProduct.aspx.cs" Inherits="EditProduct" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/jquery.form.js"></script>
    <script type="text/javascript" src="imgs/GetAjax.js"></script>

</head>
<body onload='$("#loading").hide()'>
<div class="container" id="cpcontainer">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div>   
<form name="addform" id="addformAjax"  method="post"  >
<table class="tb">
<tr class="thead"><th colspan="2">
    编辑产品数据(<font color='red'>＊</font>为必填,其它选填)</th></tr>
	<tr>
	  <td align="right" height="22" style="width: 90px">名称：</td>
	  <td><input id="m_nameAjax" name="m_name" size="23" autocomplete="off"  value="" runat="server" />&nbsp;<font color='red'>＊</font><span id="m_name_ok"></span>类 型：<%=ProductClassDp("ed_type")%>	
          <input id="HiddenId" runat="server" type="hidden" />
          </td>
	</tr>
    <tr>
        <td align="right" height="22" style="width: 90px">
            产品型号：</td>
        <td>
            <input name="proType" id="proType" type="text" readonly="readonly" value="" style="width: 104px" runat="server">
            <iframe src="FileDownLoad/ZrNet_upload.htm" scrolling="no" topmargin="0" width="300" height="24" marginwidth="0" marginheight="0" frameborder="0" align="center"></iframe>
            &nbsp;<span style="color: #ff0000">支持图片类型gif|jpg|bmp|png，大小5M以下（by 周睿）</span><input id="content" type="hidden"  name="imgSrc" runat="server" style="color: #ff0000"/>
	 </td>
    </tr>
	<tr>
	  <td align="right" style="height: 31px; width: 90px;">
          别名：</td>
	  <td style="height: 31px"><input type="text" id="keywordAjax"  name="tag" size="30" runat="server" />  用空格隔开
          </td>
	</tr>
	<tr>
	  <td align="right" style="height: 31px; width: 90px;">  &nbsp;&nbsp;点击率：</td>
	  <td style="height: 31px"><input type="text" name="view" id="m_hitAjax" maxlength="9"  value=0  onblur='checkInput(this.value,"num")' runat="server"/></td>
	</tr>
    <tr>
        <td align="right" height="22" style="width: 90px">
            排序：</td>
        <td>
            <input id="psort" type="text" name="prosort" value="1" runat="server" /></td>
    </tr>
	<tr><td colspan='2'>&nbsp;<img src='imgs/btn_add.gif' class='pointer' align='absmiddle' onclick="$('#seo').stop().toggle()"/>&nbsp;&nbsp;<font color="red">产品优化设置(包括头部,关键字,描述,底部)</font></td></tr>
	<tr><td colspan='2' id="seotd"><table id="seo" width="100%" style="display:none;">
    <tr>
        <td align="right" style="height: 56px;width:73px">
            页面标题：</td>
        <td style="height: 56px">
            <textarea id="title" name="title" style="width: 490px; height: 69px" runat="server"></textarea></td>
    </tr>
    <tr>
        <td align="right" style="height: 56px;width:73px">
            页面关键字：</td>
        <td style="height: 56px">
            <textarea id="key" name="key" style="width: 490px; height: 69px" runat="server"></textarea></td>
    </tr>
    <tr>
        <td align="right" style="height: 56px;width:73px">
            页面描述：</td>
        <td style="height: 56px">
            <textarea id="des" name="des" style="width: 490px; height: 69px" runat="server"></textarea></td>
    </tr>
    <tr>
        <td align="right" style="height: 56px;width:73px">
            底部描述：</td>
        <td style="height: 56px">
            <textarea id="down"  name="up" style="width: 490px; height: 69px" runat="server"></textarea></td>
    </tr>
    </table></td></tr>
	<tr>
	  <td align="right" height="22" style="width: 90px"></td>
	  <td>
          说明:尽量把产品填写完整，这样能更好的被搜索引擎收录</td>
	</tr>
	<tr>
	  <td align="right" height="22" style="width: 90px">相关介绍：</td>
	   <td>
           <fckeditorv2:fckeditor id="FCKeditor1" runat="server" height="300px" toolbarset="Zrnet"
               width="650px"   ></fckeditorv2:fckeditor>
           </td>
	</tr>

	 <tr>
   <td style="height: 27px; width: 90px;"></td> <td class="forumRow" style="height: 27px" ><input type="button" class="btn" value="确认保存" name="Submit" id="tijiao"/>&nbsp;<input type="reset" class="btn" value="清 除"  onclick="resetCon('FCKeditor1')">&nbsp;<input type=button class="btn" value="返　回" onClick="javascript:location.href='adminProduct.aspx';"/>
       </td>
  </tr>
</table>

</form>

</div>
   
<script type="text/javascript">
function resetCon(source) {
    //document.addform.reset();
    var oEditor=FCKeditorAPI.GetInstance(source).EditorDocument.body.innerHTML="";
    return false;
}
</script>
<script type="text/javascript">
$(document).ready(function(){

    var options = { 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
        // other available options: 
         url:       "?state=update",         // override for form's 'action' attribute 
       // type:        'post'        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: true,        // clear all form fields after successful submit 
        resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
    $('#tijiao').click(function(){
            $("#loading").show();
            var oEditor = FCKeditorAPI.GetInstance("FCKeditor1") ;   
            oEditor.UpdateLinkedField(); 
            $('#addformAjax').ajaxSubmit(options);
            return false;
    });
})
function showResponse(msg){ 
    if(msg=="1")
    {       
        alert("编辑成功!!!");
         $("#loading").hide();
        location.href="adminProduct.aspx";
     }           
} 
function showRequest(formData, jqForm, options) {            
	 
     return true; 
} 

</script>
</body>
</html>
